package com.jk.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

/***
 * @ClassName: logoutController
 * @Description:TODO
 * @Auther: TaiBai
 * @Date: 2021/7/7 21:09
 * @version : V1.0
 */
@Controller
public class logoutController {
    /*
    * @Author  TaiBai
    * @Description //TODO 登出 清除session
    * @Date 21:11 2021/7/7
    * @method  logout
    * @Param [request]
    * @return java.lang.String
    **/
    @RequestMapping("/logout")
    public String logout(HttpSession request){
        Object clent = request.getAttribute("clent");
        request.invalidate();
        return "index";
    }

}
